(display "\n========================================\n")
(define (cons a b)
    (* (expt 2 a)
       (expt 3 b)))

(define x (cons 3 2))
(display x)
(newline)

(define (car z)
    (define (iter z counter)
        (if (= (remainder z 2) 0)
            (iter (/ z 2) (+ counter 1))
            counter))
    (iter z 0))

(display (car x))
(newline)

(define (cdr z)
    (define (iter z counter)
        (if (= (remainder z 3) 0)
            (iter (/ z 3) (+ counter 1))
            counter))
    (iter z 0))

(display (cdr x))
(newline)
(display "\n========================================\n")
